module.exports = {
  preset: '@vue/cli-plugin-unit-jest',
  transform: {
    '^.+\\.vue$': 'vue-jest',
  },
  moduleNameMapper: {
    '^@Config/server/api$': '<rootDir>/tests/mock.js',
    //'@Config/server/localStorage': '<rootDir>/tests/mock.js',
    //'@Config/config': '<rootDir>/tests/mock.js',
    //  '^@Config/server/api$': '<rootDir>/src/config/server/api',

    '^@Config/(.*)': '<rootDir>/src/config/$1',
    '^@Components/(.*)': '<rootDir>/src/components/$1',
    '^@Page/(.*)': '<rootDir>/src/Page/$1',
    '^@Untils': '<rootDir>/src/untils',
    '^@Assets/fonts/svg': '<rootDir>/src/assets/fonts/svg.js',

    // '^@Components': path.resolve(__dirname + '/src/components'),
    // '^@Config': path.resolve(__dirname + '/src/config'),
    // '^@Hooks': path.resolve(__dirname + '/src/hooks'),
    // '^@Assets': path.resolve(__dirname + '/src/assets'),
    // '^@Routers': path.resolve(__dirname + '/src/routers'),
    // '^@Untils': path.resolve(__dirname + '/src/untils'),
  },
  collectCoverage: true,
  setupFiles: ['<rootDir>/jest.setup.js'],
  // testMatch: ['<rootDir>/tests/unit/notice.spec.js'],
}
